/* Copyright 2015 Sam Hewitt.
*
* This file is part of the Paper GTK theme.
*
* The Paper GTK theme is free software: you can redistribute it
* and/or modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* The Paper GTK theme is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with the Paper GTK theme. If not, see http://www.gnu.org/licenses/.
*/

/******************
 * Titlebar (CSD) *
 ******************/

.titlebar {
    padding:0;
    border: none;
    border-radius: 3px 3px 0 0;
    background-color: @header;
    color: @header_text;
    box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.1),
                inset 0 -1px 0 0 rgba(0,0,0,0.1),
                inset 0 -3px 3px -4px alpha(#000, 0.4);
}

.maximized .titlebar {
    border-radius: 0px;
    box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.1);
}

.titlebar:backdrop {
    background-image: none;
    background-color: @backdrop_header;
    color: @backdrop_header_text;
}

.titlebar:insensitive {
    color: @insensitive_header_text;
}

.titlebar.default-decoration {
    padding: 6px;
    padding-bottom: 0px;
    padding-top: 0px;
    background-color: @header;
    background-image: none;
    color: @header_text;
}

.titlebar .title {
    padding-left: 13px;
    padding-right: 13px;
    color: @header_text;
    font: Bold 10;
}

/* Subtitle */
.titlebar .subtitle {
    font: 9;
}

.titlebar .subtitle,
.titlebar .subtitle GtkLabel,
.titlebar .subtitle GtkImage {
    color: alpha(@header_text,0.8);
}

.titlebar .subtitle:backdrop,
.titlebar .subtitle:backdrop GtkLabel,
.titlebar .subtitle:backdrop GtkImage  {
    color: alpha(@backdrop_header_text,0.8);
}



/**********************
 * Header bar buttons *
 **********************/

.titlebar .flat,
.titlebar .button,
.titlebar .title,
.titlebar .titlebutton,
.titlebar .linked,
.titlebar .text-button,
.titlebar .image-button {
    background-color: transparent;
    background-image: none;
    border: none;
    padding: 12px 15px;
}

/* Normal Button */
.titlebar .button,
.titlebar .text-button,
.titlebar .titlebutton,
.titlebar .linked,
.titlebar .flat,
.titlebar .suggested-action .button,
.titlebar .image-button {
    background-color: transparent;
    background-image: none;
    border-radius: 0px;
    border: none;
    outline: none;
    color: @header_text;
    box-shadow: none;
}

/* Active Button */
.titlebar .button:active,
.titlebar .text-button:active,
.titlebar .titlebutton:active,
.titlebar .linked:active,
.titlebar .flat:active,
.titlebar .suggested-action .button:active,
.titlebar .image-button:active {
    border-radius: 0px;
    /*background-color: alpha(#000, 0.1);*/
    background-image: none;
    border: none;
    outline: none;
    color: @header_text;
    box-shadow: inset 0 -2px 0 0 @header_text;
}

.titlebar .text-button:active {
    font: Bold 10;
}

/* Checked Button */
.titlebar .button:checked,
.titlebar .text-button:checked,
.titlebar .titlebutton:checked,
.titlebar .linked:checked,
.titlebar .flat:checked,
.titlebar .suggested-action .button:checked,
.titlebar .image-button:checked {
    border-radius: 0px;
    /*background-color: alpha(#000, 0.1);*/
    background-image: none;
    border: none;
    outline: none;
    color: @header_text;
    box-shadow: inset 0 -2px 0 0 @header_text;
}

.titlebar .text-button:checked {
    font: Bold 10;
}

/* Focus Button */
.titlebar .button:focus,
.titlebar .text-button:focus,
.titlebar .titlebutton:focus,
.titlebar .linked:focus,
.titlebar .flat:focus,
.titlebar .suggested-action .button:focus,
.titlebar .image-button:focus {
    border-radius: 0px;
    background-color: transparent;
    border: none;
    outline: none;
    color: @header_text;
    box-shadow: inset 0 -2px 0 0 @header_text;
}

/* Hover Button */
.titlebar .button:hover,
.titlebar .text-button:hover,
.titlebar .titlebutton:hover,
.titlebar .linked:hover,
.titlebar .flat:hover,
.titlebar .suggested-action .button:hover,
.titlebar .image-button:hover {
    border-radius: 0px;
    background-color: alpha(#000, 0.1);
    background-image: none;
    border: none;
    outline: none;
    /*box-shadow: inset 0 -2px 0 0 @header_text;*/
    color: @header_text;
}

/* Backdrop Button */
.titlebar .button:backdrop,
.titlebar .text-button:backdrop,
.titlebar .titlebutton:backdrop,
.titlebar .linked:backdrop,
.titlebar .flat:backdrop,
.titlebar .suggested-action .button:backdrop,
.titlebar .image-button:backdrop {
    border-radius: 0px;
    background-color: transparent;
    background-image: none;
    border: none;
    outline: none;
    color: @backdrop_header_text;
}


/* *:Backdrop Button */
.titlebar .button:hover:backdrop,
.titlebar .text-button:hover:backdrop,
.titlebar .titlebutton:hover:backdrop,
.titlebar .linked:hover:backdrop,
.titlebar .flat:hover:backdrop,
.titlebar .suggested-action .button:hover:backdrop,
.titlebar .image-button:hover:backdrop,
.titlebar .button:checked:backdrop,
.titlebar .text-button:checked:backdrop,
.titlebar .titlebutton:checked:backdrop,
.titlebar .linked:checked:backdrop,
.titlebar .flat:checked:backdrop,
.titlebar .suggested-action .button:checked:backdrop,
.titlebar .image-button:checked:backdrop,
.titlebar .button:focus:backdrop,
.titlebar .text-button:focus:backdrop,
.titlebar .titlebutton:focus:backdrop,
.titlebar .linked:focus:backdrop,
.titlebar .flat:focus:backdrop,
.titlebar .suggested-action .button:focus:backdrop,
.titlebar .image-button:focus:backdrop,
.titlebar .button:active:backdrop,
.titlebar .text-button:active:backdrop,
.titlebar .titlebutton:active:backdrop,
.titlebar .linked:active:backdrop,
.titlebar .flat:active:backdrop,
.titlebar .suggested-action .button:active:backdrop,
.titlebar .image-button:active:backdrop {
    border-radius: 0px;
    background-color: transparent;
    background-image: none;
    border: none;
    outline: none;
    color: @backdrop_header_text;
    box-shadow: inset 0 -2px 0 0 @backdrop_header_text;
}

.titlebar .text-button:active:backdrop {
    font: Bold 10;
}

/* Backdrop:Hover; Button */
.titlebar .button:backdrop:hover,
.titlebar .text-button:backdrop:hover,
.titlebar .titlebutton:backdrop:hover,
.titlebar .linked:backdrop:hover,
.titlebar .flat:backdrop:hover,
.titlebar .suggested-action .button:backdrop:hover,
.titlebar .image-button:backdrop:hover {
    background-color: transparent;
    background-image: none;
    border-radius: 0px;
    border: none;
    outline: none;
    box-shadow: inset 0 -2px 0 0 @backdrop_header_text;
    color: @backdrop_header_text;
}

/* Insensitive Button */
.titlebar .button:insensitive,
.titlebar .text-button:insensitive,
.titlebar .titlebutton:insensitive,
.titlebar .linked:insensitive,
.titlebar .flat:insensitive,
.titlebar .suggested-action .button:insensitive,
.titlebar .image-button:insensitive {
    background-color: transparent;
    background-image: none;
    border-radius: 0px;
    border: none;
    outline: none;
    color: @insensitive_header_text;
}

/* Insensitive:Backdrop Button */
.titlebar .button:insensitive:backdrop,
.titlebar .text-button:insensitive:backdrop,
.titlebar .titlebutton:insensitive:backdrop,
.titlebar .linked:insensitive:backdrop,
.titlebar .flat:insensitive:backdrop,
.titlebar .suggested-action .button:insensitive:backdrop,
.titlebar .image-button:insensitive:backdrop {
    border-radius: 0px;
    background-color: transparent;
    background-image: none;
    border: none;
    outline: none;
    color: @insensitive_header_text;
}

/* Button Images */
.titlebar .button GtkImage,
.titlebar .button GtkImage:active,
.titlebar .button GtkImage:focus,
.titlebar .button GtkImage:hover,
.titlebar .titlebutton .button GtkImage,
.titlebar .titlebutton .button GtkImage:active,
.titlebar .titlebutton .button GtkImage:focus,
.titlebar .titlebutton .button GtkImage:hover,
.titlebar .titlebutton GtkImage,
.titlebar .titlebutton GtkImage:active,
.titlebar .titlebutton GtkImage:focus,
.titlebar .titlebutton GtkImage:hover {
    color: @header_text;
}

.titlebar .titlebutton .button GtkImage:active:backdrop,
.titlebar .titlebutton .button GtkImage:backdrop,
.titlebar .titlebutton .button GtkImage:backdrop:hover,
.titlebar .titlebutton GtkImage:active:backdrop,
.titlebar .titlebutton GtkImage:backdrop,
.titlebar .titlebutton GtkImage:backdrop:hover,
.titlebar .button GtkImage:active:backdrop,
.titlebar .button GtkImage:backdrop,
.titlebar .button GtkImage:backdrop:hover {
    color: @backdrop_header_text;
    -gtk-image-effect: dim;
}


.titlebar .button GtkImage:insensitive,
.titlebar .titlebutton GtkImage:insensitive,
.titlebar .titlebutton .button GtkImage:insensitive  {
    color: @insensitive_header_text;
    -gtk-image-effect: dim;
}

.titlebar .button GtkImage:insensitive:backdrop,
.titlebar .titlebutton GtkImage:insensitive:backdrop,
.titlebar .titlebutton .button GtkImage:insensitive:backdrop  {
    color: mix(@backdrop_toolbar_text, @insensitive_toolbar_text, 0.5);
    -gtk-image-effect: dim;
}


/* Button Arrows */
.titlebar .button GtkArrow,
.titlebar .button GtkArrow:active,
.titlebar .button GtkArrow:focus,
.titlebar .button GtkArrow:hover {
    color: @header_text;
}

.titlebar .button GtkArrow:active:backdrop,
.titlebar .button GtkArrow:backdrop,
.titlebar .button GtkArrow:backdrop:hover {
    color: @backdrop_header_text;
    -gtk-image-effect: dim;
}

.titlebar .button GtkArrow:insensitive {
    color: @insensitive_header_text;
    -gtk-image-effect: dim;
}

.titlebar .button GtkArrow:insensitive:backdrop {
    color: mix(@backdrop_toolbar_text, @insensitive_toolbar_text, 0.5);
    -gtk-image-effect: dim;
}


/* Button Labels */
.titlebar .button GtkLabel,
.titlebar .button GtkLabel:active,
.titlebar .button GtkLabel:focus,
.titlebar .button GtkLabel:hover,
.titlebar .titlebutton .button GtkLabel,
.titlebar .titlebutton .button GtkLabel:active,
.titlebar .titlebutton .button GtkLabel:focus,
.titlebar .titlebutton .button GtkLabel:hover,
.titlebar .titlebutton GtkLabel,
.titlebar .titlebutton GtkLabel:active,
.titlebar .titlebutton GtkLabel:focus,
.titlebar .titlebutton GtkLabel:hover {
    color: @header_text;
}

.titlebar .titlebutton .button GtkLabel:active:backdrop,
.titlebar .titlebutton .button GtkLabel:backdrop,
.titlebar .titlebutton .button GtkLabel:backdrop:hover,
.titlebar .titlebutton GtkLabel:active:backdrop,
.titlebar .titlebutton GtkLabel:backdrop,
.titlebar .titlebutton GtkLabel:backdrop:hover,
.titlebar .button GtkLabel:active:backdrop,
.titlebar .button GtkLabel:backdrop,
.titlebar .button GtkLabel:backdrop:hover {
    color: @backdrop_header_text;
    -gtk-image-effect: dim;
}


.titlebar .button GtkLabel:insensitive,
.titlebar .titlebutton GtkLabel:insensitive,
.titlebar .titlebutton .button GtkLabel:insensitive  {
    color: @insensitive_header_text;
    -gtk-image-effect: dim;
}

.titlebar .button GtkLabel:insensitive:backdrop,
.titlebar .titlebutton GtkLabel:insensitive:backdrop,
.titlebar .titlebutton .button GtkLabel:insensitive:backdrop  {
    color: mix(@backdrop_toolbar_text, @insensitive_toolbar_text, 0.5);
    -gtk-image-effect: dim;
}


.titlebar .right .button:first-child,
.titlebar .right .titlebutton:first-child {
    border: none;
    outline: none;
}

.titlebar .right .button:last-child,
.titlebar .right .titlebutton:last-child {
    border: none;
    outline: none;
}

.titlebar .left .button:last-child,
.titlebar .left .titlebutton:last-child {
    border: none;
    outline: none;
}

.titlebar .left .button:first-child,
.titlebar .left .titlebutton:first-child {
    border: none;
    outline: none;
}

